package io.zouyalong.algo.leetcode;

/**
 * https://leetcode-cn.com/problems/valid-number/
 */
enum NumberState {
    Start,
    SignOccurs,
    ZeroPrefix,
    IntOccurs,
    PointOccurs,
    DecimalNumOccurs,
    EOccurs,
    ESignOccurs,
    ENumOccurs,
    BlankOccurs,
    Invalid,
    Finish,
}

public class ValidNumber {

    private NumberState stateShift(NumberState ori, char current) {
        switch (current) {
            case ' ':
                switch (ori) {
                    case Start:
                    case BlankOccurs:
                    case Invalid:
                    case Finish:
                        return ori;
                    case DecimalNumOccurs:
                    default:
                        return NumberState.Invalid;
                }
        }

        return NumberState.Start;
    }

    public boolean solution(String s) {
        var current = NumberState.Start;
        for (char c : s.toCharArray()) {
            switch (c) {
                case ' ':
            }
        }
        return false;
    }
}
